package com.biofuelsfinder;

import android.app.Activity;
import android.app.ListActivity;
import android.database.SQLException;
import android.database.sqlite.SQLiteDatabase;
import android.database.Cursor;
import android.os.Bundle;
import android.util.Log;
import android.view.View;
import android.widget.TextView;
import android.widget.ListView;
import android.widget.Spinner;
import android.widget.ArrayAdapter;
import android.widget.SimpleAdapter;
import java.io.IOException;
import java.util.HashMap;
import java.util.ArrayList;

public class biofuelsfinder extends Activity {
    /** Called when the activity is first created. */

    private Spinner fuelspinner;
    
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);
        fuelspinner = (Spinner) findViewById(R.id.Spinner01);
        final String[] items = {"eth", "b5", "b10", "b15", "b20", "b25", "b30", "b35", "b40", "b45", "b50", "b55", "b60", "b65", "b70", "b75", "b80", "b85", "b90", "b95", "b100"};
        ArrayAdapter<String> adapter = new ArrayAdapter<String>(this,
                android.R.layout.simple_spinner_item, items);
        fuelspinner.setAdapter(adapter);
    }
    
    public void buttonClickHandler(View target){
    	RetailerList retailers = new RetailerList();
    	retailers.fillData(this, fuelspinner.getSelectedItem().toString());
    	Log.i("Input", fuelspinner.getSelectedItem().toString());
    }
    
    
}